import time
from selenium.webdriver.common.keys import Keys
class Base():
    def __init__(self,driver):
        self.driver = driver
    #进入网址
    def get_url(self,url):
        self.driver.get(url)
    #输入内容
    def send_keys(self,url,info):
        self.driver(url).send_keys(info)
    #点击
    def click(self,url):
        self.driver(url).click()
    #文本
    def text(self,loc):
       return print(self.driver(loc).text)
    #睡觉
    def sleep(self,u):
        time.sleep(u)
    #放大
    def maximize_window(self):
        self.driver.maximize_window()
    #退出浏览器
    def quit(self):
        self.driver.quit()
    #关闭当前页面
    def close(self):
        self.driver.close()
    #放小
    def minimize_window(self):
        self.driver.minimize_window()